-- GENERATED SPELL FOR [Nexus-Prince Shaffar] --


function spell0_18344(pUnit, Event) --@Blink,Self--
pUnit:FullCastSpellOnTarget(34605,pUnit)
pUnit:RegisterEvent('Sorts_18344', 1370, 1)
end

function spell1_18344(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(32363,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18344', 1000, 1)
end

function spell2_18344(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(32365,pUnit)
pUnit:RegisterEvent('Sorts_18344', 5405, 1)
end

function spell3_18344(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(32364,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18344', 5000, 1)
end

function Sorts_18344(pUnit, Event)
local choix_sorts_18344 = math.random(0, 3)
if choix_sorts_18344 == 0 then
pUnit:RegisterEvent('spell0_18344', 1, 1)
end
if choix_sorts_18344 == 1 then
pUnit:RegisterEvent('spell1_18344', 1, 1)
end
if choix_sorts_18344 == 2 then
pUnit:RegisterEvent('spell2_18344', 1, 1)
end
if choix_sorts_18344 == 3 then
pUnit:RegisterEvent('spell3_18344', 1, 1)
end
end

function mob18344_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18344', math.random(1500, 3000), 1)
end

function mob18344_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18344_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18344_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18344, 1, 'mob18344_Action')
RegisterUnitEvent(18344, 2, 'mob18344_Leave')
RegisterUnitEvent(18344, 3, 'mob18344_Kill')
RegisterUnitEvent(18344, 4, 'mob18344_Die')
